package org.example.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 商品实体类
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Goods {
    private Integer id;
    private String goodsName; // 商品名称
    private float price; // 商品售价
    private Integer categoryId; // 商品分类id
    private String goodsImg; // 商品图片
    private Integer vendorId; // 商品供应商id
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    private String unit; // 商品单位
    private float purchasePrice;// 商品进价
    private LocalDate produceDate;// 生产日期
    private LocalDate overdueDate;// 过期日期
    private String remark; // 备注
    private Integer quantity;// 库存
}
